home *** CD-ROM | disk | FTP | other *** search
- 
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title></title>
- <meta http-equiv="msthemecompatible" content="yes">
- <meta name="DialogResizable" content="true">
- <meta name="DialogSize" content="350,125">
-
- <style>
- button { width: 8em; }
- table { border: none; border-collapse: collapse }
- </style>
- <script src="FPLib.js" type="text/JavaScript"></script>
- <script src="Strings.js" type="text/JavaScript"></script>
- <script type="text/JavaScript">
- var L_strInsert_DialogTitle = "Insert Property";
- var L_strEdit_DialogTitle = "Edit Property";
- var L_strVisibility_DialogTitle = "Visibility";
- var L_strInvalidPropertyName_ErrorMessage = "You must enter a valid property name to continue.";
- var L_strInvalidPropertyValue_ErrorMessage = "You must enter a valid property value to continue.";
- </script>
- <script type="text/JavaScript">
-
- var g_strDialogType = ""; // set in initializeForm();
-
- function onOk()
- {
- if( "edit" == g_strDialogType || "insert" == g_strDialogType )
- {
- var strPropertyName = trimStringLeft( trimStringRight( String( theForm.edPropertyName.value ) ) );
- var strPropertyValue = trimStringLeft( trimStringRight( String( theForm.edPropertyValue.value ) ) );
-
- if( ( 0 >= strPropertyName.length ) ||
- !isValidStyleName( strPropertyName ) )
- {
- alert( L_strInvalidPropertyName_ErrorMessage );
-
- theForm.edPropertyName.focus();
-
- return;
- }
-
- if( 0 >= strPropertyValue.length )
- {
- alert( L_strInvalidPropertyValue_ErrorMessage );
-
- theForm.edPropertyValue.focus();
-
- return;
- }
-
- var astrReturn = new Array();
-
- astrReturn[0] = String( strPropertyName );
- astrReturn[1] = String( strPropertyValue );
- }
- else if( "visibility" == g_strDialogType )
- {
- var astrReturn = new Array();
-
- astrReturn[0] = getVisibility();
- }
-
- window.returnValue = astrReturn;
- window.close();
- }
-
- function onCancel()
- {
- window.returnValue = null;
- window.close();
- }
-
- function isValidStyleName( strStyleName )
- {
- var regexp = /[^a-z0-9_\.]+/i;
-
- var n = strStyleName.search( regexp );
-
- if( 0 <= strStyleName.search( regexp ) )
- {
- return false;
- }
-
- return true;
- }
-
- function initializeForm()
- {
- var aoArguments = window.dialogArguments;
- var strDialogType = aoArguments[0];
-
- g_strDialogType = strDialogType.toLowerCase();
-
- if( "insert" == g_strDialogType )
- {
- document.title = L_strInsert_DialogTitle;
-
- idPropertyForm.style.display = "block";
-
- safeFocus( theForm.edPropertyName );
- }
- else if( "edit" == g_strDialogType )
- {
- document.title = L_strEdit_DialogTitle;
-
- idPropertyForm.style.display = "block";
-
- theForm.edPropertyName.value = aoArguments[1];
- theForm.edPropertyValue.value = aoArguments[2];
-
- safeFocus( theForm.edPropertyName );
- }
- else if( "visibility" == g_strDialogType )
- {
- document.title = L_strVisibility_DialogTitle;
-
- idVisibilityForm.style.display = "block";
-
- setVisibility( aoArguments[1] );
-
- var oChecked = null;
-
- if( theForm.radInherit.checked ) safeFocus( theForm.radInherit );
- else if( theForm.radVisible.checked ) safeFocus( theForm.radVisible );
- else if( theForm.radHidden.checked ) safeFocus( theForm.radHidden );
- }
- }
-
- function setVisibility( strValue )
- {
- theForm.radInherit.checked = false;
- theForm.radVisible.checked = false;
- theForm.radHidden.checked = false;
-
- if( "visible" == strValue.toLowerCase() ) theForm.radVisible.checked = true;
- else if( "hidden" == strValue.toLowerCase() ) theForm.radHidden.checked = true;
- else theForm.radInherit.checked = true; // default
- }
-
- function getVisibility()
- {
- if( theForm.radInherit.checked ) return "inherit";
- if( theForm.radVisible.checked ) return "visible";
- if( theForm.radHidden.checked ) return "hidden";
- }
-
- </script>
- </head>
- <body onload="initializeForm()">
- <form id="theForm" name="theForm" onsubmit="onOk(); return false;">
- <table height="100%" width="100%">
- <tr>
- <td>
- <div id="idPropertyForm" style="display: none">
- <table>
- <tr>
- <td nowrap>
- <label accesskey="n" for="edPropertyName">
-
-
- Property <u>N</u>ame:
- </label>
- </td>
- <td>
-
- </td>
- <td width="100%">
- <input size="55" id="edPropertyName" name="edPropertyName" type="text">
- </td>
- </tr>
- <tr>
- <td nowrap>
- <label accesskey="v" for="edPropertyValue">
-
-
- Property <u>V</u>alue:
- </label>
- </td>
- <td>
-
- </td>
- <td width="100%">
- <input size="55" id="edPropertyValue" name="edPropertyValue" type="text">
- </td>
- </tr>
- </table>
- </div>
- <div id="idVisibilityForm" style="display: none">
- <table width="100%">
- <tr>
- <td>
- <table>
- <tr>
- <td nowrap>
-
- Visibility style
- </td>
- <td>
-
- </td>
- <td width="100%">
- <hr />
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>
- <table>
- <tr>
- <td>
-
- </td>
- <td>
- <input id="radInherit" tabIndex="1" type="radio" CHECKED value="inherit" name="ElementGroup">
- </td>
- <td nowrap>
- <label accesskey="i" for="radInherit">
-
-
- <u>I</u>nherit
- </label>
- </td>
- </tr>
- <tr>
- <td>
-
- </td>
- <td>
- <input id="radVisible" tabIndex="2" type="radio" CHECKED value="visible" name="ElementGroup">
- </td>
- <td nowrap>
- <label accesskey="v" for="radVisible">
-
-
- <u>V</u>isible
- </label>
- </td>
- </tr>
- <tr>
- <td>
-
- </td>
- <td>
- <input id="radHidden" tabIndex="2" type="radio" CHECKED value="hidden" name="ElementGroup">
- </td>
- <td nowrap>
- <label accesskey="h" for="radHidden">
-
-
- <u>H</u>idden
- </label>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- </td>
- <tr>
- <td colspan="3" height="100%">
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <hr>
- </td>
- </tr>
- <tr>
- <td colspan="3" width="100%">
- <table width="100%">
- <tr>
- <td width="100%">
-
- </td>
- <td>
- <table>
- <tr>
- <td>
- <button id="btnOk" tabindex="2" type="submit">
-
- OK
- </button>
- </td>
- <td>
-
- </td>
- <td>
- <button id="btnCancel" onclick="onCancel()" tabindex="3">
-
- Cancel
- </button>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
- </body>
- </html>
-